package ferus.tigris.easymarks;

import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.graphics.Point;
import android.graphics.Rect;

public class StatisticView implements AbstractView {
	private GameManager gameManager;

	public StatisticView(GameManager gameManager) {
		this.gameManager = gameManager;
	}

	public Bitmap getBitmap() {
		Bitmap bitmap = Bitmap.createBitmap(50, 50, Bitmap.Config.ARGB_8888);
		Canvas canvas = new Canvas(bitmap);
		Paint paint = new Paint();
		paint.setFlags(Paint.ANTI_ALIAS_FLAG);
		paint.setColor(Color.RED);
		paint.setTextSize(20);
		canvas.drawText(String.valueOf(gameManager.scope()), 10, 20, paint);
		return bitmap;
	}

	@Override
	public void draw(Canvas canvas) {
		Bitmap bmp = getBitmap();
		Rect src = new Rect(0, 0, bmp.getWidth(), bmp.getHeight());
		canvas.drawBitmap(bmp, src, src, null);
	}

	@Override
	public void setPosition(Point position) {
		
	}

	@Override
	public void setVector(Vector2D vector) {
		
	}

	@Override
	public int width() {
		return 0;
	}

	@Override
	public int height() {
		return 0;
	}
}
